import request from '@/utils/request'

// 类型获取
export function getCategoryList() {
  return request({
    url: '/category/list',
  })
}

// 类型tree获取
export function getCategoryTree() {
  return request({
    url: '/category/tree',
  })
}
// 新增类型
export function categoryAdd(data) {
  return request({
    url: 'category',
    method:'post',
    data
  })
}

// 修改类型
export function categoryEdit(data) {
  return request({
    url: 'category',
    method:'put',
    data
  })
}

// 删除类型
export function categoryDel(id) {
  return request({
    url: '/category/'+id,
    method:'delete',
  })
}
